AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2019 15:22:08 +0000 (16:22 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2019 15:22:08 +0000 (16:22 +0100)
commit75de893687b72409e2fd3d776ac43f75717522c8
treeface4685c77c3e4069f8d4919f0c172ee5df0382
parentfd405712c75121de793783cadf6add63ad0d39b8
AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page

Unmapping a page which has never been mapped should be a no-op (note how
it already is in case there was no root page table allocated). There's
in particular no need to grow the number of page table levels in use,
and there's also no need to allocate intermediate page tables except
when needing to split a large page.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: ad591454f069647c36a7daaa9ec23384c0263f0b
master date: 2019-11-12 11:08:34 +0100
xen/drivers/passthrough/amd/iommu_map.c